from selenium.webdriver.common.by import By
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time

driver=webdriver.Firefox()
driver.get('https://www.baidu.com/')
driver.implicitly_wait(5)
driver.find_element(By.CLASS_NAME,'soutu-btn').click()

upload=WebDriverWait(driver,20,0.5).until(EC.presence_of_element_located((By.CLASS_NAME,'upload-pic')))

upload.send_keys(r'C:\Users\15085\Desktop\E42EA33F0EC37E9975213707BD530699.png')
time.sleep(5)
driver.save_screenshot('baidu.png')
time.sleep(15)

driver.quit()




